# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=ksmbd-tools
pkgver=3.4.5
pkgrel=0
pkgdesc="userspace tools for kernel smb server (ksmbd)"
url="https://github.com/cifsd-team/ksmbd-tools"
arch="all"
license="GPL-2.0-or-later"
[ "$CARCH" = "riscv64" ] && options="$options textrels"
makedepends="autoconf automake libtool libnl3-dev glib-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/cifsd-team/ksmbd-tools/archive/refs/tags/$pkgver.tar.gz"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
41108e5a677efe3c23630e5f960eaf79a92e49988593f1ec7d42cc3083931b5a35be39669035e0fb706d489f4d8f9cba7e0e4c8f2df3b6c4754266b087d26f4c  ksmbd-tools-3.4.5.tar.gz
"
